package com.jbm.jsm.iface;

import com.jbm.core.iface.IAcross;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by Administrator on 2017/9/26.
 */
@Entity
@Table(name = "room_focus_audit", schema = "", catalog = "jsm")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class RoomFocusAuditEntity extends IAcross
{
    public RoomFocusAuditEntity()
    {
        super();
    }

    public RoomFocusAuditEntity(IAcross ia)
    {
        super(ia);
    }

    private int rfaId;
    private Integer selfId;
    private Integer targetId;
    private Integer createId;
    private Timestamp createDate;
    private Integer status;
    private Integer auditId;
    private Timestamp auditDate;
    private Integer type;

    @Id
    @Column(name = "rfa_id")
    @GeneratedValue
    public int getRfaId() {
        return rfaId;
    }

    public void setRfaId(int rfaId) {
        this.rfaId = rfaId;
    }

    @Basic
    @Column(name = "self_id")
    public Integer getSelfId() {
        return selfId;
    }

    public void setSelfId(Integer selfId) {
        this.selfId = selfId;
    }

    @Basic
    @Column(name = "target_Id")
    public Integer getTargetId() {
        return targetId;
    }

    public void setTargetId(Integer targetId) {
        this.targetId = targetId;
    }

    @Basic
    @Column(name = "create_id")
    public Integer getCreateId() {
        return createId;
    }

    public void setCreateId(Integer createId) {
        this.createId = createId;
    }

    @Basic
    @Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Basic
    @Column(name = "audit_id")
    public Integer getAuditId() {
        return auditId;
    }

    public void setAuditId(Integer auditId) {
        this.auditId = auditId;
    }

    @Basic
    @Column(name = "audit_date")
    public Timestamp getAuditDate() {
        return auditDate;
    }

    public void setAuditDate(Timestamp auditDate) {
        this.auditDate = auditDate;
    }

    @Basic
    @Column(name = "type")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        RoomFocusAuditEntity that = (RoomFocusAuditEntity) o;

        if (rfaId != that.rfaId) return false;
        if (auditDate != null ? !auditDate.equals(that.auditDate) : that.auditDate != null) return false;
        if (auditId != null ? !auditId.equals(that.auditId) : that.auditId != null) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (createId != null ? !createId.equals(that.createId) : that.createId != null) return false;
        if (selfId != null ? !selfId.equals(that.selfId) : that.selfId != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (targetId != null ? !targetId.equals(that.targetId) : that.targetId != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = rfaId;
        result = 31 * result + (selfId != null ? selfId.hashCode() : 0);
        result = 31 * result + (targetId != null ? targetId.hashCode() : 0);
        result = 31 * result + (createId != null ? createId.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (auditId != null ? auditId.hashCode() : 0);
        result = 31 * result + (auditDate != null ? auditDate.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        return result;
    }
}
